''This article forms the third section of the FritzBot ET waypointing tutorial. If you are looking for the RTCW tutorial go [http://fritzbot.bots-united.com/tutorial/sec_four.htm Here].''

'''THIS ARTICLE IS UNDER CONSTRUCTION. IF YOU WANT TO HELP FEEL FREE TO USE THE DISCUSSION PAGE. OTHERWISE PLEASE COME BACK LATER '''

==Basic Info==

Having learned how nodes make it possible for the bots to navigate the map, now it is time you gave the bots a purpose to follow them.  The bots know nothing about the map, so they have no reason to leave the spawn area.  By adding actions points to the map the bots can chose to navigate to them to perform the action you specify.  Properly placed nodes may make the bots look human moving through the map.  But to emulate humans they need your knowledge about what to do, where to do it, and when to do it.  By waypointing in Actions, that information is provided by the action attributes, by the action placement and by the AIscript (discussed later).  In this section we also introduce the concept of the goal tracker (a counter that monitors main objectives). Used mainly in FritzBot for RTCW, in FritzBot ET the goal tracker is effectively replaced by improved aiscript functionality.  But the goal tracker remains part of the game logic and does help in debugging your waypoints.

The number of actions you place in the map will affect the play style of the bots.  Too many actions may spread the bots out, decreasing their chance of massing to attack and win.  Too few actions and you may find the bots somewhat predictable.  You should never need to exceed the 256 Action limit.  At a minimum (for objective-type maps) you might need 50-70 actions to complete the map, 100+ to make it interesting, with big maps possibly needing double these numbers.  It is a good idea to start by placing the objective actions first, and minimal numbers of the optional Actions.  Then work on the aiscript sequencing and test the results.  Once you are satisfied that the logic works, add in more Actions to improve the attack/defense behavior based on the style and strategy you prefer.  Styles include the camp-ambush and the roaming fighter style.  Strategies can be fixed to a step-at-a-time progression, or use a fluid multiple-point attack to probe for weaknesses.  Each waypointer has their own style and preference where the map design allows.

Once you understand what action types are available and how they can be turned on/off, writing down a bot-strategy is a good idea.  It helps keep order to your waypoints, making it easier to fix mistakes. But more about that later.

Below we will also show how you can save your waypoints at any stage, reload the map, add a few bots and see what they do with your actions.  But first lets discuss what are the properties and attributes of Actions.

==Action HUD & Finding Action Info==

With so many properties, having to use the console to query actions could be tedious. So using the in-game heads-up-display (HUD) is a faster way to review properties and see changes.  To enable the HUD you should first enable the waypoint editor (if not already).  This can be done in the console by;

And then enable the drawing of Actions in the map. 
 /node_vis 2
Restart the video if you can't see the existing yellow action spindles.
 /vid_restart
Now that you can see the location of Action spindles from the console turn on the Action HUD
 /node_drawhud 2 
then press enter and you should see a list of properties similar to this;

[[Image:Action_wHUDrad.jpg]]

The list may appear similar to that for nodes, and like that HUD it follows the Action closest to your position.

'''Action Num''' = Displays the number of the action you are closest to.  This number is also displayed above the action itself.

'''Allied Obj''' = This is the specific action type set for the Allies for the action you're nearest. By default it's set to -1
(no action)

'''Axis Obj''' = Similar to Allied Obj but this one is the Axis action set for the same action point.  By default this is also set to -1 (no Action).  A single action point can have the same or different actions for the two teams or just have an action for one team (the other team having -1 or no action)

'''Action Group ID''' = This is the Action Group ID the particular action is part of.  By grouping Actions we can turn them all on or all off by a single command in the aiscript.

'''Active Forever''' = Indicates if the particular action remains active irregardless of the Goal tracker.  For legacy reasons this defaults to -1 but as will be discussed later should be 1.

'''Closest Node''' = This is the node the bot navigates to in order to find this action.  By default set to the closest node.  If this value is incorrect or too far away (>500) the bot may not find the action.

'''Action Radius''' = This is the logical area the action takes up on the map as shown by the radii spokes.  Like nodes, action locations are spheres in 3D space, with many actions requiring the bot to touch or enter the sphere before performing the action indicated.

'''Action EntNum''' = This is the number of the map entity the particular action is linked too. For a few actions that do not depend on map entities this property is used for special logical flags.

'''Action Classes''' = This is used to tell the bots which player classes (Soldier, Medic, Engineer, Field Op or Covert Op) may use this action (if possible).

'''Action GoalNum''' = This is the goal tracker goal_num that can be used to enable this action.  In aiscript control method you would only use values to either enable at the start of the round (GoalNum 0) or to leave the action not enabled by the goal tracker (e.g. GoalNum -1, or 999).

'''Action Prone''' = This is the flag to tell the bot to lie down when performing the action (if possible).  Use value 1 for lie down/prone, 0 for crouch/normal posture.

'''Action Behind''' and,
'''Behind GoalNum''' were not implemented so ignore them and do not change their values.

'''Linked Actions''' = This is used to link certain other actions to the this action. The type of actions that can be linked depends on the action type (Axis Obj and Allied Obj).

==Adding an Action==
 TO DO: add and add with parameters, effect of closenode, "no node in sight"

==Deleting Actions==

==Moving an Action==

==Grouping Actions==

==The Goal Tracker & Goal_numbers==

===Action Active===

==Action Radius==
 TO DO: Where it matters, how to change it, what is too small or too large

 Suggested action_radius values by type
 camping in the open : radius 30 - 50
 camping at a window  aim at 90 degrees : radius 30
 camp at a window aim at less than 45 degree : radius 20
 Camping standing looking down , over ledge or wall : radius 20-30
 mgnest and mg camps : radius 30 - 50 
 roam : radius 70 or default
 alt-roam : radius 70 or default
 dynamite plant : varies depending on plant-able area, radius 30 - 70
 construct or command post: varies on area you can construct from, radius 30 - 60
 mine planting  single landmine :  varies depending on map, radius 40-70 if possible
 mine planting multiple land mines : varies, radius 70 and larger
 event expire or event explode : radius 10 (radius 1 for those entities added by map scripting)

==Setting Action Types==

==Action Types Overview and Descriptions==

===No Task/Type Setting===

==Action Types: Camping and Patrolling==

===Roam/Patrol Actions===

 TO DO: discuss insensitity to radius or position i.e. close node.
        images of roam at H&A, image showing how to aim a roam (rockeyes)

===Bot Camp, Aim & Linking Actions===
 TO DO: discuss stand flag, single vs multiple aims as well as permanently active aim actions, 
        class restriction camp defense, radius and pairing of camps
        images of camps and the aim actions (et_slide exercise)

===Other Camp Actions===
====Panzer Camp====

====Sniper Camp====

====Mobile MG42 Camp====

====Engineer Camp====
 TO DO: discuss when to use or not to use, limiting the number of camps vs number of engineers
        image example caha tavern?

====Defend Camp====

===MG42 Actions===
 general discussion
====MG42 Camp====

====MG42 Basic====
 TO DO: Discuss use with roam, alt roam or nearby camp
        image of roam-mg combo trenches05?

==Action Types: Map Objectives==

===Constructions===
 TO DO: how even inactive constructs trigger code (aiscript) minor vs major and priority management, dynamite vs construct major plant actions. effect of multistage

===Dynamite Objectives===
 TO DO: discuss byzantine notw 2 sided dynamite

===Multiple Dynamite Plant Objectives===
 TO DO: discuss last 5 second disarm bug, proper linking of other identical dynamite objectives that must all be active at same time. 

===Checkpoint Objectives===
 TO DO: explain difference between spawn flag, check flag and capture the flag

===Spawn Flag Objectives===
 TO DO: importance of node and action having correct entnum, placement and radii of node+action, how to handle the permanent removal of the flag(aiscript), making connections pass through the flag node when flag is in spawn or when it is beside cp etc. image the_port..
 
===Steal & Escape Objectives===
 TO DO: discuss goaltracker and bug prevention (aiscript), deliver bug and ensuring opposite team patrols the deliver, 

===Command Posts===
 TO DO: when is satchelling not automatic, neutral vs team specific

===Satchel===
 TO DO; byzantine notw 2 sided satchel satcheling of constructable mgnests and regular mgnests

==Action Types: Other Hints==
===Airstrike Hints===

===Smoke Can Hint===

===Mine Spotting===

==Actions that Monitor Events==

These will be discussed again later in the tutorial on the bot AI script system.  There are a couple of action types that are only used to monitor changes in the map.  

The first one, Event expire is triggered when the entity associated with a trigger_objective_info entity is permantent removed (such as the tank and truck barrier construction crates dissappearing once the vehicle passes by in Goldrush).  Also when a permanent barrier disappears (say the bank doors in goldrush) or when an object is removed this action may be able to detect the event.  

The second action type, Event explode action monitors single use func_explosive entities.   

Other actions that monitor events for the AI script system include dynamite, construct, construct_dynamite, steal, flag and command post builds.

==Other Actions==

==Action Classes==

==Changing an Actions Active Status==

==Setting an Actions Nearest Node==

==Viewing Specific Actions==

==Console Command Quick Lookup==

'''/viewent''' - Displays entity information for the objective or other map object seen in your cross-hairs.

'''/node_drawonly <actiontype#>''' - Displays only those actions in the map matching the indicated actiontype value (e.g. /node_drawonly 0 displays only camp actions)

'''/node_drawhud 2''' - Displays the in-game action HUD

'''/g_action_info <action#>''' - Displays current game information about the specified action in the console. (e.g. /g_action_info 6 will display information in the console for action 6).  Edits made after the match started are not current to the game and are not reflected in this command's output.

'''/action_info <action#>''' - Displays, in the console, information about the specified action that can be saved in the nav file.  This includes any edits made after the match started whether saved or not. Matches the info in the action HUD.

'''/action_add''' - Adds an action at your present position (it remains invisible unless you give it a valid action task/type).  Accepts additional optional parameters that can define most of the action's attributes.

'''/action_axis <action#> <actiontype#>''' - Sets the Axis action type for the specified action (e.g. /action_axis 4 0 sets action 4 as an Axis general camp action)

'''/action_allies <action#> <actiontype#>''' - Sets the Allied action type for the specified action (e.g. /action_allies 4 12 sets action 4 as an Allied roam/patrol action)

'''/action_clear''' - Deletes all actions on the map. (Use with caution if you must use it. Backup the nav file before using.)

'''/action_move <action#>''' - Moves the specified action to your current position (e.g. /action_move 17 moves action 17 to your current position).

'''/action_group <action#> <GroupID>''' - Sets the action group-ID number for the specified action (e.g. /action_group 5 1 makes action 5 part of action group 1).

'''/action_goal <action#> <Goal#>''' - Sets the action goal trigger number for the specified action# (e.g. /action_goal 5 0 makes action 5 activate at the start of the match or when the goal tracker is 0).

'''/action_radius <action#> <radius>''' - Sets the specified actions radius to the second parameter's value. (e.g. /action_radius 13 40 will set action 13's radius to 40)

'''/action_links <action#> <link1> <link2> <link3> <link4>''' - Links different actions logically.  For dynamite-defuse actions links multiple plant spots to same objective.  For camp actions it links up to 4 aim actions to direct the4 bots. (e.g. /action_links 4 17 19 23 makes aim actions 17, 19 & 23 available aim directions for camp action 4)

'''/action_ent <action#> <entity#>''' - Sets which map entity the given action is linked to (e.g. /action_ent 23 305 sets action 23 to be linked with map entity 305)

'''/action_class <action#> <class#>''' - Specifies which player class (soldiers, medics, engineers, field ops etc.) can access the specified action (e.g. /action_class 7 1 indicates that only soldiers can access action 7)

'''/action_active <action#> 1''' - Sets the specified action to ignore the goal tracker when active. The action remains active through the whole match, unaffected by any goal tracker goal_num changes. Action can only be deactivated by Aiscript. (e.g. /action_active 47 1 makes action 47 active "forever").

'''/action_closenode <action#> <node#>''' - Sets which node, close to the given action, that the bot navigates to in order to reach the action.  This is the node the bot approaches the action from.  (e.g. /action_closenode 8 39 sets node 39 as action 13's "closest" node)

==Next Tutorial==

There are a few test questions you can try for review [[Fritzbot_ET_waypointing_tutorial#Test_your_knowledge_4| Here]] ''(I suggest you open it in a new window or tab)''

To continue the tutorial go to [[FritzBot ET Routes]].

==Further Reading==

*[http://wiki.bots-united.com/index.php/Fritzbot_ET_Intro_to_Waypointing Start of Tutorial]
*[http://wiki.bots-united.com/index.php/FritzBot_ET_Intermediate_waypointing Previous Section]

==Credits==

Special thanks go to Denny for his RTCW tutorial on which this article is modeled and borrows from.
[[Category:FritzBot ET Waypointing Tutorials|4 FritzBot ET Actions]]
